import request from '@/utils/request'
import qs from 'qs'

/* ========================= modules ============================= */

export function systemModuleList(data) {
  return request({
    url: 'system/modules/list',
    method: 'POST',
    data: qs.stringify(data)
  })
}

export function systemModuleAdd(data) {
  return request({
    url: 'system/modules/add',
    method: 'POST',
    data: qs.stringify(data)
  })
}

export function systemModuleDetail(id) {
  return request({
    url: 'system/modules/detail',
    method: 'POST',
    data: qs.stringify({ id: id })
  })
}

export function systemModuleDel(id) {
  return request({
    url: 'system/modules/del',
    method: 'POST',
    data: qs.stringify({ id: id })
  })
}

export function systemModuleImageUpload(id) {
  return request({
    url: 'system/modules/imageUpload',
    method: 'POST',
    data: qs.stringify({ id: id })
  })
}

/* ========================= 配置 Configure ============================= */

export function systemConfigureList(data) {
  return request({
    url: 'system/configures/list',
    method: 'POST',
    data: qs.stringify(data)
  })
}

export function systemConfigureAdd(data) {
  return request({
    url: 'system/configures/add',
    method: 'POST',
    data: qs.stringify(data)
  })
}

export function systemConfigureDetail(id) {
  return request({
    url: 'system/configures/detail',
    method: 'POST',
    data: qs.stringify({ id: id })
  })
}

export function systemConfigureDel(id) {
  return request({
    url: 'system/configures/del',
    method: 'POST',
    data: qs.stringify({ id: id })
  })
}

